<?php

namespace App\Traits\GetModel;

use App\Models\Applet\Cart\CartModel;
use App\Models\Applet\Other\AreasModel;
use App\Models\Applet\Other\PaymentOrderModel;
use App\Models\Applet\Other\SettingModel;
use Exception;

trait GetOtherModelTrait
{
    /**
     * @return AreasModel
     * @throws Exception
     */
    public function getAreaModel(): AreasModel
    {
        return loadModel('Applet\Other\AreasModel');
    }

    /**
     * @return SettingModel
     * @throws Exception
     */
    public function getSettingModel(): SettingModel
    {
        return loadModel('Applet\Other\SettingModel');
    }

    /**
     * @return PaymentOrderModel
     * @throws Exception
     */
    public function getPaymentOrderModel(): PaymentOrderModel
    {
        return loadModel('Applet\Other\PaymentOrderModel');
    }

    /**
     * @return CartModel
     * @throws Exception
     */
    public function getCartModel(): CartModel
    {
        return loadModel('Applet\Cart\CartModel');
    }
}
